#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
#include<stdlib.h>

int main()
{
	int count = 0;
	int input = 0;
	scanf("%d", &input);

	while (input == 0)
	{
		if (input % 2 == 0)
		{
			count++;
		}
		input /= 2;
	}
	printf("%d", count);
	return 0;
}